package cn.wei.youvie.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import lombok.Data;

/**
 * 存储书籍的基本信息
 */
@TableName(value ="books")
@Data
public class Book implements Serializable {
    /**
     * 唯一标识书籍的 ID
     */
    @TableId(value = "book_id", type = IdType.AUTO)
    private Integer bookId;

    /**
     * 书籍标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 书籍作者
     */
    @TableField(value = "author")
    private String author;

    /**
     * 出版年份
     */
    @TableField(value = "publication_year")
    private String publicationYear;

    /**
     * 书籍类型或类别
     */
    @TableField(value = "genre")
    private String genre;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 书籍描述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 是否删除
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}